package com.thread.test;

import java.util.concurrent.locks.ReentrantLock;

public class MultiThreadAndUnsafe {

    private static int total;

    public static void main(String[] args) {

        ReentrantLock lock = new ReentrantLock(false);

        for(int i=0; i<10; i++){
            new Thread(() -> {
                for(int j=0; j<1000; j++){
                    total ++;
                }
            }).start();
        }
        System.out.println(total);
    }

}
